<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no" />
    <meta name="renderer" content="webkit">
    <meta name="keywords" content="{$navCur.keywords}"/>
    <meta name="description" content="{$navCur.description}"/>
    <title>{$navCur.seotitle}_{$config.site_name}</title>
    <link rel="stylesheet" href="__CDN__/assets/addons/wwh/css/swiper.min.css">
    <link rel="stylesheet" href="__CDN__/assets/addons/wwh/css/style.css">
    <link rel="stylesheet" href="__CDN__/assets/addons/wwh/css/media.css">
    <link rel="stylesheet" href="__CDN__/assets/addons/wwh/css/animate.min.css">
    <script type="text/javascript" src="__CDN__/assets/addons/wwh/js/jquery.min.js"></script>
    <script type="text/javascript" src="__CDN__/assets/addons/wwh/js/swiper.min.js"></script>
    <script type="text/javascript" src="__CDN__/assets/addons/wwh/js/style.js"></script>
    <script type="text/javascript" src="__CDN__/assets/addons/wwh/js/wow.min.js"></script>
    <script type="text/javascript" src="__CDN__/assets/addons/wwh/js/index.js"></script>
    <script type="text/javascript" src="__CDN__/assets/addons/wwh/js/layer/layer.js"></script>
    <link rel="shortcut icon" href="__CDN__/assets/addons/wwh/images/favicon.ico">
</head>
<style>
    * {
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
    }
    #join-upload{
        width: 100px;
        height: 36px;
        line-height: 36px;
        position: relative;
        background-color: #0096ff;
        border-radius: 4px;
        float: left;
        text-align: center;
        color: #fff;
        margin: 5px 0;
    }
    #join-upload input[type="file"]{
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
    }
    #file_name.desc{height: 46px;line-height: 46px;}
</style>
<body>
<!--头部-->
{include file="header" /}
<!--内容-->
<div id="bann" style="background-image: url({$config.banner5|cdnurl});">
    <div class="container">
        <div class="t1 wow fadeInUp" data-wow-delay="200ms">
            {$config.ban5_t1}<br>
        </div>
        <div class="t2 wow fadeInUp" data-wow-delay="300ms">
            <span>{$config.ban5_t2}</span>
        </div>
    </div>
</div>

<div class="nav_pc hide wow fadeInLeft" data-wow-delay="400ms">
    <div class="container">
        <a class="home" href="{:addon_url('wwh/index/index')}"><img src="__CDN__/assets/addons/wwh/images/home_ico.png" style="background-color: #0f6ab4;" alt=""></a>
        <div class="first">
            <h4>{if condition="($navCur.parent_id == '0')"} {$navCur.name} {else /} {$top.name} {/if}</h4>
            <ul>
                {volist name="nav" id="v"}
                {if condition="($v.classify == 'about') OR ($v.type == 'link')"}
                {else /}
                <li><a href="{:addon_url('wwh/index/column', [':diyname'=>$v.diyname])}">{$v.name}</a></li>
                {/if}
                {/volist}
            </ul>
        </div>
        <div class="second active">
            <h4>
                {if condition="($navCur.parent_id == '0')"}公司概况{else /}{$navCur.name}{/if}
            </h4>
            <ul>
                {volist name="nav" id="v"}
                {if condition="($v.classify == 'about')"}
                {volist name="v.childlist" id="vv"}
                <li><a href="{:addon_url('wwh/index/column', [':diyname'=>$vv.diyname])}">{$vv.name}</a></li>
                {/volist}
                {else /}
                {/if}
                {/volist}
            </ul>
        </div>
    </div>
</div>
<div class="nav_phone hide container ">
    {volist name="nav" id="v"}
    {if condition="($v.classify == 'about') OR ($v.type == 'link')"}
    <p><a href="{:addon_url('wwh/index/column', [':diyname'=>$v.diyname])}">{$v.name}</a></p>
    {else /}
    {/if}
    {/volist}
    {if condition="($navCur.parent_id == '0')"}
    <p><a href="{:addon_url('wwh/index/column', [':diyname'=>$navCur.diyname])}">公司概况</a></p>
    {else /}
    <p><a href="{:addon_url('wwh/index/column', [':diyname'=>$navCur.diyname])}">{$navCur.name}</a></p>
    {/if}
</div>

<div id="join">
    <div class="container">
        <div class="join-box">
            <div class="join-nav wow fadeInUp" data-wow-delay="200ms">
                <a class="item active">社会招聘</a>
            </div>
            <div class="text wow fadeInUp" data-wow-delay="300ms">我们期待这样的你：<br>勇于挑战，敢于创新，突破自我，在专业道路上不断精进；<br>有协作精神，能与伙伴真诚沟通，共同学习成长。</div>
            <form method="get" class="join-select wow fadeInUp" data-wow-delay="400ms">
                <input type="text" name="keywords" id="keywords" value="" placeholder="输入职位关键字">
                <div class="select">
                    <select name="branch" id="branch">
                        <option value="" selected>所有部门</option>
                        {wwh:cvsearch table="wwh_position" field="dept" id="v"}
                        <option value="{$v.dept}">{$v.dept}</option>
                        {/wwh:cvsearch}
                    </select>
                </div>
                <div class="select">
                    <select name="address" id="address">
                        <option value="" selected>工作地点</option>
                        {wwh:cvsearch table="wwh_position" field="addr" id="v"}
                        <option value="{$v.addr}">{$v.addr}</option>
                        {/wwh:cvsearch}
                    </select>
                </div>
                <button class="btn" type="submit">搜索</button>
            </form>
            <ul class="join-list">
                    {wwh:join id="v" page="6"}
                <li class="wow fadeInUp" data-type="volist">
                    <div class="recruit-top">
                        <div>
                            职位： <span>{$v.name}</span>
                        </div>
                        <div>
                            部门：<span>{$v.dept}</span>
                        </div>
                        <div>
                            工作地点：<span>{$v.addr}</span>
                        </div>
                        <div>
                            招聘人数：<span>{$v.num}</span>
                        </div>
                        <div>
                            发布时间： <span>{$v.time}</span>
                        </div>
                    </div>
                    <div class="recruit-content">
                        <h2 style="margin: 0px; padding: 18px 0px; font-size: 18px; color: rgb(51, 51, 51); border-top: 0px none; font-family: " microsoft="" white-space:="" background-color:=""><span class="bname" style="height: 20px; line-height: 20px; margin-top: 15px; padding-left: 15px; border-left: 4px solid rgb(255, 96, 0);">职位信息</span></h2>
                        {$v.content}
                        <a href="javascript:;" class="join-in" onclick="showForm(this.name)" name="{$v.name}">立即申请</a>
                    </div>
                </li>
                    {/wwh:join}
            </ul>
        </div>
        <div class="fenye wow fadeInUp" data-wow-delay="300ms">{:$__LIST__->render()}</div>
    </div>
</div>
<!--底部-->
{include file="footer" /}
<script>
    function showForm(e){
        var html = '<form class="join-form" action="" method="post" id="form1" enctype="multipart/form-data">'+
            '<div class="line clearfix">'+
            '<p class="label">姓　　名：</p>'+
            '<input type="text" name="realname" id="realname">'+
            '</div>'+
            '<div class="line clearfix">'+
            '<p class="label">联系电话：</p>'+
            '<input type="text" name="tel" id="tel">'+
            '</div>'+
            '<div class="line clearfix">'+
            '<p class="label">应聘岗位：</p>'+
            '<input type="text" name="gangwei" id="gangwei" value="'+e+'" readonly="readonly" style="background-color: #eeeeee;cursor: not-allowed;">'+
            '</div>'+
            '<div class="line">'+
            '<p class="label">上传简历：</p>'+
            '<div class="upload" id="join-upload"><span>上传简历</span><input type="file" name="url" id="url" onchange="changeFile(this);"></div>'+
            '<span id="file_name" class="desc"></span>'+
            '</div>'+
            '<div class="line clearfix">'+
            '<p class="label">验证码：</p>'+
            '<input type="text" placeholder="" name="verify" id="verify" style="width: 100px;">'+
            '<img id="verifyImgs" src="{:addon_url(\'wwh/index/verify\')}" alt="验证码" title="看不清楚?换一张" onclick="this.src=\'{:addon_url(\'wwh/index/verify\')}?seed=\'+Math.random()"/>'+
            '<button type="button" id="submit_btn">确定上传</button>'+
            '</div>'+
            '</form>';
        layer.open({
            type: 1,
            title: false,
            closeBtn: 1,
            shadeClose: false,
            anim:1,
            area: ['auto','auto'],
            // content: $("#add-main"),
            content: html,
        });
        //提交简历
        $("#submit_btn").click(function(){
            var formdata = new FormData(document.getElementById("form1"));
            var realname=$.trim($("#realname").val());
            var tel=$.trim($("#tel").val());
            var gangwei=$.trim($("#gangwei").val());
            var url=$.trim($("#url").val());
            var verify=$.trim($("#verify").val());
            if(realname==''){layer.alert('请填写姓名',{skin: 'layui-layer-lan' ,closeBtn: 0,title:"温馨提示：",icon:2,anim:2});return false;}
            if(tel==''){layer.alert('请填写电话',{skin: 'layui-layer-lan' ,closeBtn: 0,title:"温馨提示：",icon:2,anim:2});return false;}
            var reg=/(^(\d{3,4}-)?\d{7,8})$|(1[3|4|5|7|8|9]\d{9})$/;
            if(!reg.test(tel)){layer.alert('请填写有效的电话',{skin: 'layui-layer-lan' ,closeBtn: 0,title:"温馨提示：",icon:2,anim:2});return false;}
            if(gangwei==''){layer.alert('请选择应聘岗位',{skin: 'layui-layer-lan' ,closeBtn: 0,title:"温馨提示：",icon:2,anim:2});return false;}
            if(url==''){layer.alert('请上传简历',{skin: 'layui-layer-lan' ,closeBtn: 0,title:"温馨提示：",icon:2,anim:2});return false;}
            if(verify==''){layer.alert('请填写验证码',{skin: 'layui-layer-lan' ,closeBtn: 0,title:"温馨提示：",icon:2,anim:2});return false;}
            //重载验证码
            function fleshVerify(){
                $('#verifyImgs').attr('src','{:addon_url('wwh/index/verify')}?seed='+Math.random());
            }
            $.ajax({
                url: "{:addon_url('wwh/index/injoin')}",
                type: "POST",
                data:formdata,
                cache:false,
                async:false,
                contentType: false,
                processData: false,
                dataType:"json",
                success: function(mes){
                    if(mes==1){
                        alert("提交成功");
                        window.location.reload();
                    }else if(mes==2){
                        layer.alert('请检查后台邮件配置|插件邮箱配置',{skin: 'layui-layer-lan' ,closeBtn: 0,title:"温馨提示：",icon:2,anim:2});
                        fleshVerify();
                    }else if(mes==3) {
                        layer.alert('上传文件后缀不允许', {skin: 'layui-layer-lan',closeBtn: 0,title: "温馨提示：",icon: 2,anim: 2});
                        fleshVerify();
                    }else {
                        layer.alert('验证码错误，请重试',{skin: 'layui-layer-lan' ,closeBtn: 0,title:"温馨提示：",icon:2,anim:2});
                    }
                }
            })
        })
    };
    function changeFile(obj) {
        console.log($(obj)[0].value.split('\\'));
        $("#file_name").text($(obj)[0].value.split('\\')[2]);
    };
</script>
<script type="text/javascript">
    $('.nav_pc .first, .nav_pc .second').on('mouseenter mouseleave', function () {
        $(this).children('ul').stop().slideToggle()
    });

    $('body').on('click', '.join-list .recruit-top', function () {
        if($(this).hasClass("flag")){
            $(this).removeClass("active");
            $(this).removeClass("flag");
            $(this).parent("li").children(".recruit-content").slideUp(600);
        }else{
            $(".join-list .recruit-top").removeClass("active");
            $(this).addClass("active");
            $(".join-list .recruit-top").removeClass("flag");
            $(this).addClass("flag");
            $(".join-list .recruit-top").parent("li").children(".recruit-content").slideUp(600);
            $(this).parent("li").children(".recruit-content").slideDown(600);
        }
    });
</script>
</body>
</html>
